package com.example.wechat.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

@TableName("group_message")
public class GroupMessage {
    @TableId
    private Long id;
    
    private Long groupId;
    
    private String from;
    private String content;
    private LocalDateTime timestamp;
    private Boolean isRead;
    
    @TableField(exist = false)
    private Group group;
    
    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public Long getGroupId() { return groupId; }
    public void setGroupId(Long groupId) { this.groupId = groupId; }
    public String getFrom() { return from; }
    public void setFrom(String from) { this.from = from; }
    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }
    public LocalDateTime getSendTime() { return timestamp; }
    public void setSendTime(LocalDateTime timestamp) { this.timestamp = timestamp; }
    public Boolean getIsRead() { return isRead; }
    public void setIsRead(Boolean isRead) { this.isRead = isRead; }
    public Group getGroup() { return group; }
    public void setGroup(Group group) { this.group = group; }
}